Computer science lesson plan
Class: 4 - Lesson: 22 Code.org

Purpose: Learn conditional statements.

No. of. classes

Two or three classes (Teacher's decision).

Material Required

Paper, pen, chalk, sheet, any object

Curriculum Content
  • (10) Basic programming
  • Prior knowledge

    Children should know the following before this exercise.

  • Moving words and directions
  • Should be aware of the ‘repeat’ and ‘repeat until’ loops
  • Conditional statements
  • Exercise

    Exercise:1



    Introduction to conditional statement - Simple if , If else, If , do-else.:

  • Create a table with 10 rows and 5 columns as given picture in material
  • Keep any object on R1, C3 (pink highlight) another Object in R3, C3 (green highlight), another Object in R5, C2 (blue highlight), and another Object in R7,C5 (Orange highlight)
  • Use if, if else, if path and do-else pick up the objects as explained below in the solution:
  • Solution



  • Link to copy output exercise solution file.

  • Teacher Instruction
    1. Even if it takes time, the teachers should have a look at the exercise and familiarize themselves first with these exercise levels before giving them to the students.
    2. Students are allowed to do the exercise first in their notebook before performing the exercise.
    3. If the students have any doubt, the teacher should clarify them.
    4. Teachers to clarify all doubts like loops, sequence of operations, etc., of the students.
    5. Allow the children to see the solution for the first time.
    6. Then the teacher should guide the students to do the next levels.
    7. Use the words “Simple if”, “If else”, “If path”, “Do else” etc. While teaching the students need to become familiar with these words.
    8. Sign In into code.org before playing the code.org game.